import React, { useState } from 'react'

function App() {
  const [count, setcount] = useState(0)

 
  const jia = () => {
    setcount(count + 1)
  }
  const cz = () => {
    setcount(0)
  }
  return (
    <div>
      
      <p>当前计数：{count}</p>
      <div>
       
        <button onClick={cz}>重置</button>
        <button onClick={jia}>+</button>
      </div>
    </div>
  )
}

export default App